package edu.suda.xsap.dto.convert;

import edu.suda.xsap.dto.ClassRecordDto;
import edu.suda.xsap.entity.ClassRecord;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")

public interface ClassRecordConvert {
    @Mapping(source="cardName", target = "cardName")
    @Mapping(source="memberId", target = "memberId")
    @Mapping(source="scheduleId", target = "scheduleId")
    @Mapping(source="bindCardId", target = "bindCardId")
    @Mapping(source="checkStatus", target = "checkStatus")
    @Mapping(source="comment", target = "comment")
    @Mapping(source="id", target = "id")
    @Mapping(source="note", target = "note")
    @Mapping(source="reserveCheck", target = "reserveCheck")
    ClassRecordDto toDto(ClassRecord classRecord);
    List<ClassRecordDto> toDtoList(List<ClassRecord> classRecords);

}
